﻿using GGetTestService.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace GGetTestService.Entity
{
    /// <summary>
    /// 教师实体
    /// </summary>
    public class Teacher
    {

        [Key]
        public Guid Id { get; set; }

        [MaxLength(250)]
        public string Name { get; set; }

        public int Age { get; set; }

        [Required]
        [MaxLength(250)]
        public string Subject { get; set; }

        [Required]
        public Gender Gender { get; set; }

        public IEnumerable<Student> Students { get; set; } = new List<Student>() { };

    }
}
